<template>
  <div class="s">
    <div class="imgBlock">
      <div class="imgEle"></div>
    </div>
    <div class="content">
      <h1>404</h1>
      <div class="desc">抱歉，您访问的页面或资源不存在！</div>
      <div class="actions"><a-button type="primary" @click="back" >返回上一页</a-button></div>
    </div>
  </div>
</template>

<script lang="ts" setup>
  import { useRouter } from 'vue-router'
  
  const router = useRouter()
  const back = () =>{
    const path = sessionStorage.getItem('beforePath') || '/set/menu'
    router.push(path)
  }
</script>

<style lang="less" scoped>
.s{
  min-height: 500px;
  height: 80%;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
}

.s .imgBlock{
  -webkit-box-flex: 0;
  -ms-flex: 0 0 62.5%;
  flex: 0 0 58%;
  padding-right: 100px;
  zoom: 1;
}

.s .imgBlock .imgEle{
  height: 360px;
  width: 100%;
  max-width: 430px;
  float: right;
  background-repeat: no-repeat;
  background-position: 50% 50%;
  background-size: contain;
  background-image: url('@/assets/image-svg/404.svg');
}

.s .content{
  -webkit-box-flex: 1;
  flex: auto;
}

.s .content h1{
  color: #434e59;
  font-size: 72px;
  font-weight: 600;
  line-height: 72px;
  margin-bottom: 24px;
}

.s .content .desc{
  color: rgba(0,0,0,.45);
  font-size: 20px;
  line-height: 28px;
  margin-bottom: 16px;
}

</style>